<?php

    include_once("code/DataProvider.php");
    if(isset($_REQUEST["id"]) == true)
    {
        $MaND = $_REQUEST["id"];
        $query = "SELECT * FROM `nguoidung` WHERE MaND ='".$MaND."'";
        $result = DataProvider::executeQuery($query);
        $row = mysql_fetch_array($result);
        $bixoa = $row["BiXoa"];
        if($bixoa == 0)
        {
            $query = "UPDATE nguoidung SET BiXoa = '1' WHERE MaND = '".$MaND."'";
            DataProvider::executeQuery($query);
        }
        else
        {
            $query = "UPDATE nguoidung SET BiXoa = '0' WHERE MaND = '".$MaND."'";
            DataProvider::executeQuery($query);
        }
        DataProvider::ChangeURL("admin.php?act=2");
    }
    DataProvider::ChangeURL("admin.php?act=2");
?>